package com.itheima.media.controller;

import com.itheima.media.skywalking.AlarmMessage;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：shenkunlin
 * @date： 2021/9/5 15:11
 * @Description：
 ***/
@RestController
@RequestMapping(value = "/skywalking")
public class WebhookController {

    /***
     * 告警信息获取
     * @param alarm
     * @return
     */
    @RequestMapping(value = "/webhook")
    public String webhook(@RequestBody AlarmMessage alarm){
        System.out.println("收到的告警信息------>"+alarm);
        return "OK";
    }
}
